function sub() {
    var $name = $("#name");
    var $phone = $("#phone");
    var $address = $("#address");
    var $msg = $("#msg");
    if ($name.val() == "") {
        alert("请填入名字");
        $name.focus();
        return false;
    }
    if ($phone.val() == "" || !/^1[0-9]{10}$/.test($phone.val())) {
        alert("请填入正确手机号码");
        $phone.focus();
        return false;
    }
    if ($address.val() == "") {
        alert("请填入地址");
        $address.focus();
        return false;
    }
    $.post("/order", $("form[name='order']").serialize(), function (result) {
        alert("下单成功,稍后会有客服人员与您联系");
        $("form[name='order']")[0].reset();
        window.location.reload();
        return;
    });
    return false;
}